package com.me.customerdemo.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

public class BaseDict {

    /**
     * id 主键
     * */
    private int id;

    /**
     * 条目类型
     * */
    private String itemType;

    /**
     * 条目标题
     * */
    private String itemTitle;

    /**
     * 条目字段数据
     * */
    private String itemData;


    /**
     * 是否为可编辑
     * */
    private int isEditable;

    public BaseDict(int id, @NotBlank(message = "项目类型不能为空") String itemType, @NotBlank(message = "项目标题不能为空") @Size(max = 50, message = "项目标题不能超过50字") String itemTitle, @NotBlank(message = "项目字段数据不能为空") @Size(max = 50, message = "项目字段数据不能超过50字") String itemData, int isEditable) {
        this.id = id;
        this.itemType = itemType;
        this.itemTitle = itemTitle;
        this.itemData = itemData;
        this.isEditable = isEditable;
    }

    public BaseDict() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getItemType() {
        return itemType;
    }

    public void setItemType(String itemType) {
        this.itemType = itemType;
    }

    public String getItemTitle() {
        return itemTitle;
    }

    public void setItemTitle(String itemTitle) {
        this.itemTitle = itemTitle;
    }

    public String getItemData() {
        return itemData;
    }

    public void setItemData(String itemData) {
        this.itemData = itemData;
    }

    public int getIsEditable() {
        return isEditable;
    }

    public void setIsEditable(int isEditable) {
        this.isEditable = isEditable;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("BaseDict{");
        sb.append("id=").append(id);
        sb.append(", itemType='").append(itemType).append('\'');
        sb.append(", itemTitle='").append(itemTitle).append('\'');
        sb.append(", itemData='").append(itemData).append('\'');
        sb.append(", isEditable=").append(isEditable);
        sb.append('}');
        return sb.toString();
    }
}
